<?php
/**
 * @package		Joomla.Site
 * @subpackage	com_users
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 * @since		1.6
 */

defined('_JEXEC') or die;

?>
<fieldset id="users-profile-detail">

	<legend>
		<?php echo JText::_('COM_USERS_PROFILE_DETAIL_LEGEND'); ?>
	</legend>
	<table>

		<tr>
			<th><?php echo JText::_('COM_USERS_PROFILE_LASTNAME_LABEL'); ?>
			</th>
			<td><?php  echo $this->detail->last_name; ?>
			
			</td>

		</tr>

		<tr>
			<th><?php echo JText::_('COM_USERS_PROFILE_FIRSTNAME_LABEL'); ?>
			</th>
			<td><?php echo $this->detail->first_name; ?>
			</td>
		</tr>
		<tr>
			<th><?php echo JText::_('COM_USERS_PROFILE_PHONE_LABEL'); ?>
			</th>
			<td><?php echo $this->detail->phone_number; ?>
			</td>
		</tr>
		<tr>
			<th><?php echo JText::_('COM_USERS_PROFILE_BIRTHDAY_LABEL'); ?>
			</th>
			<td><?php if($this->detail->birthday != null) echo JHtml::_('date', $this->detail->birthday); ?>
			</td>
		</tr>
		<tr>
			<th><?php echo JText::_('COM_USERS_PROFILE_ADDRESS_LABEL'); ?>
			</th>
			<td><?php echo  $this->detail->address; ?>
			</td>
		</tr>
		<tr>
			<th><?php echo JText::_('COM_USERS_PROFILE_SEX_LABEL'); ?>
			</th>
			<td><?php if ($this->detail->sex == 1){?> <?php echo 'Nam'; ?> <?php }
			if($this->detail->sex == 0 && $this->detail->sex != null) {?> <?php echo 'Nữ';} ?> 
			
			</td>
		</tr>
		<?php 
		$id=$this->detail->country_id;
		$db =&JFactory::getDbo();
		$sql = 'select name from aas_country where id='.$id;
		$db->setQuery($sql);
		$db=$db->loadObject();
		?>
		<tr>
			<th><?php echo JText::_('COM_USERS_PROFILE_COUNTRY_LABEL'); ?>
			</th>
			<td><?php echo $db->name?>
			</td>
		</tr>
	</table>

</fieldset>
